Integrand size = 27, antiderivative size = 37 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=(A b+a B) x-\frac {b B \log (\cos (c+d x))}{d}+\frac {a A \log (\sin (c+d x))}{d} \]
[Out]
Time = 0.09 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3670, 3556, 3612} \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=x (a B+A b)+\frac {a A \log (\sin (c+d x))}{d}-\frac {b B \log (\cos (c+d x))}{d} \]
[In]
[Out]
Rule 3556
Rule 3612
Rule 3670
Rubi steps \begin{align*} \text {integral}& = (b B) \int \tan (c+d x) \, dx+\int \cot (c+d x) (a A+(A b+a B) \tan (c+d x)) \, dx \\ & = (A b+a B) x-\frac {b B \log (\cos (c+d x))}{d}+(a A) \int \cot (c+d x) \, dx \\ & = (A b+a B) x-\frac {b B \log (\cos (c+d x))}{d}+\frac {a A \log (\sin (c+d x))}{d} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.32 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=A b x+a B x+\frac {a A \log (\cos (c+d x))}{d}-\frac {b B \log (\cos (c+d x))}{d}+\frac {a A \log (\tan (c+d x))}{d} \]
[In]
[Out]
Time = 0.11 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.27
method | result | size |
parallelrisch | \(\frac {\left (-a A +B b \right ) \ln \left (\sec ^{2}\left (d x +c \right )\right )+2 a A \ln \left (\tan \left (d x +c \right )\right )+2 d x \left (A b +B a \right )}{2 d}\) | \(47\) |
norman | \(\left (A b +B a \right ) x +\frac {a A \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {\left (a A -B b \right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d}\) | \(48\) |
derivativedivides | \(\frac {\frac {\left (-a A +B b \right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (A b +B a \right ) \arctan \left (\tan \left (d x +c \right )\right )+a A \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(52\) |
default | \(\frac {\frac {\left (-a A +B b \right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2}+\left (A b +B a \right ) \arctan \left (\tan \left (d x +c \right )\right )+a A \ln \left (\tan \left (d x +c \right )\right )}{d}\) | \(52\) |
risch | \(A b x +B a x -i A a x +i B b x -\frac {2 i a A c}{d}+\frac {2 i B b c}{d}+\frac {a A \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) B b}{d}\) | \(77\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.59 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {2 \, {\left (B a + A b\right )} d x + A a \log \left (\frac {\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - B b \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 78 vs. \(2 (34) = 68\).
Time = 0.21 (sec) , antiderivative size = 78, normalized size of antiderivative = 2.11 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\begin {cases} - \frac {A a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {A a \log {\left (\tan {\left (c + d x \right )} \right )}}{d} + A b x + B a x + \frac {B b \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \tan {\left (c \right )}\right ) \left (a + b \tan {\left (c \right )}\right ) \cot {\left (c \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.40 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.41 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {2 \, A a \log \left (\tan \left (d x + c\right )\right ) + 2 \, {\left (B a + A b\right )} {\left (d x + c\right )} - {\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
[In]
[Out]
none
Time = 0.42 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.43 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {2 \, A a \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 2 \, {\left (B a + A b\right )} {\left (d x + c\right )} - {\left (A a - B b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
[In]
[Out]
Time = 7.38 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.86 \[ \int \cot (c+d x) (a+b \tan (c+d x)) (A+B \tan (c+d x)) \, dx=\frac {A\,a\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{d}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (A+B\,1{}\mathrm {i}\right )\,\left (a+b\,1{}\mathrm {i}\right )}{2\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (A-B\,1{}\mathrm {i}\right )\,\left (b+a\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d} \]
[In]
[Out]